package it.polimi.traveldream.web;

import it.polimi.traveldream.GestioneUtenteLocal;
import it.polimi.traveldream.UtenteDTO;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="gestioneRegistrazione")
@RequestScoped
public class GestioneRegistrazione {
	

	@EJB
	private GestioneUtenteLocal mnu;
	
	private UtenteDTO client;
	
	public GestioneRegistrazione(){
		this.client=new UtenteDTO();
	}

	public UtenteDTO getClient() {
		return client;
	}

	public void setClient(UtenteDTO client) {
		this.client = client;
	}
	
	public String registra() {
		mnu.save(client);
		return "home?faces-redirect=true";
	}
	
	
}

